Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protractor $timeout workaround #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Protractor $timeout workaround #337

wants to merge 1 commit into from

Conversation

boboldehampsink
Copy link

What issue is this PR resolving? Alternatively, please describe the bugfix/enhancement this PR aims to provide

Using angular-loading-bar, protractor tests often fail with the following message:

Failed: Timed out waiting for Protractor to synchronize with the page after 11 seconds. Please see https://github.com/angular/protractor/blob/master/docs/faq.md
    While waiting for element with locator - Locator: By(css selector, h1).
    The following tasks were pending:
     - $timeout: function () {
                _inc();
              }

This "pending task" is a angular-loading-bar function. According to similar problems here:

We can use $interval to work around this problem. So I implemented $interval with a count of 1 at the cost of aforementioned $timeout

Have you provided unit tests that either prove the bugfix or cover the enhancement?
Tests have been updated

Related issues

None

@faceleg
Copy link
Collaborator

faceleg commented Apr 17, 2017

@chieffancypants if this fixes people's build I have no issue with merging.

@gastonelhordoy
Copy link

I can confirm the same approach was taken in other libraries, one that comes to my mind right now is growl-2:
JanStevens/angular-growl-2#103

@LeleDev
Copy link

LeleDev commented May 5, 2017

@faceleg , yes it does

@boboldehampsink
Copy link
Author

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants